
import request from '@/utils/request'

function listPerson(params, component) {
    let param= {}
    if(component.isSearch){
        param = params
    }else{
        param = {
            pageNum:params.pageNum,
            pageSize:params.pageSize
        }
    }
    return request({
        url: '/dispatcher/listPerson',
        method: "get",
        params: param
    }).then(res => {
        component.total = res.total;
        console.log( res.rows);
        component.list = res.rows;
    });
}

export {
    listPerson
}